<#include "/macro/base.ftl" />

<form id="pagerForm" method="post" action="${base}/sys/sysPermission/list">
	<@pagerForm />
</form>


<div class="pageHeader">
	<form rel="pagerForm" onsubmit="return navTabSearch(this);" action="${base}/sys/sysPermission/list" method="post">
		<div class="searchBar">
			<ul class="searchContent">
				<li>
					<label>名称：</label>
					<input type="text"  name="name" value="${(bean.name)!}" placeholder="输入要查询的名称"/>
				</li>
				<li>
					<label>资源类型：</label>
					 <@dicSelect dicType="sys_permission_type" defaultValue="${(bean.resourceType)!}" name="resourceType"></@dicSelect>
				</li>
				<li>
					<label>资源路径：</label>
					<input type="text"  name="url" value="${(bean.url)!}" placeholder="资源路径"/>
				</li>
				<li>
					<label>是否可用：</label>
					<@dicSelect dicType="common_status" defaultValue="${(bean.status)!}" name="status"></@dicSelect>
				</li>
			</ul>
			<div class="subBar">
				<ul>
					<li><div class="buttonActive"><div class="buttonContent"><button type="submit">查询</button></div></div></li>
					<li><div class="button"><div class="buttonContent"><button type="reset">清空重输</button></div></div></li>
				</ul>
			</div>
		</div>
	</form>
</div>

<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li class="line">line</li>
			<li><a class="add" href="${base}/sys/sysPermission/add" target="dialog"
			 rel="sysPermission"  width="500" height="400"
			><span>添加</span></a></li>
			<li class="line">line</li>
			<li><a class="delete" href="${base}/sys/sysPermission/delete?id={sid}" target="ajaxTodo" title="确定要删除吗？" warn="请选中要删除的数据"><span>删除</span></a></li>
			<li class="line">line</li>
			<li><a class="edit" href="${base}/sys/sysPermission/edit?id={sid}" target="dialog"
			  rel="sysPermission"  width="500" height="400" warn="请选中要修改的数据"><span>修改</span></a></li>
			<li class="line">line</li>
		</ul>
	</div>

	<div id="w_list_print">
		<table class="list" width="100%" targetType="navTab" asc="asc" desc="desc" layoutH="116">
			<thead>
				<tr>
					<th align="center" width="50">序号</th>
					<th >名称</th>
					<th >资源类型</th>
					<th >资源路径</th>
					<th >权限字符串</th>
					<th >是否可用</th>
				    <th width="200">操作</th> 
				</tr>
			</thead>
			<tbody>
				<#if (page)??>
					<#list page.list as bean>
						<tr target="sid" rel="${ bean.id?c}">
							<td align="center">${ bean_index+1}</td>
							<td>${ (bean.name)!}</td>
							<td><@dicWriter dicType="sys_permission_type" dicValue="${(bean.resourceType)!}"></@dicWriter></td>
							<td>${ (bean.url)!}</td>
							<td>${ (bean.permission)!}</td>
							<td> <#if bean.available! == '0'>禁用</#if><#if bean.available! == '1'>可用</#if></td>
							<td>
								<a title="确定要删除吗？" target="ajaxTodo" href="${base}/sys/sysPermission/delete?id=${bean.id?c}" class="btnDel">删除</a>
								<a title="编辑" target="dialog" href="${base}/sys/sysPermission/edit?id=${bean.id?c}" 
								 rel="sysPermission"  width="500" height="400" class="btnEdit">编辑</a>
							</td> 
						</tr>
					</#list>
				<#else>
					<tr>
						<td colspan="9" align="center">暂没记录</td>
					</tr>
				</#if>
			</tbody>
		</table>
	</div>
	<@pages />
</div>
